package com.banggood.upms.dao;

import com.banggood.upms.bean.po.TreeTree;
import com.banggood.upms.bean.vo.TreeTreeVo;
import com.banggood.upms.bean.vo.search.TreeTreeSearchCriteria;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface TreeTreeDao extends BaseDao<TreeTree>{
    List<TreeTree> selectByFromTreeIdAndTreeType(TreeTreeSearchCriteria criteria);

    int deleteAll(TreeTreeVo vo);

    /**
     * 传入树节点ID的集合，筛选其中岗位树节点的ID（只有岗位树节点的ID能够被分给角色树节点），并且把结果非角色树节点的去除（防止）
     * @param treeIds
     * @return
     */
    List<String> selectRoleTreeIdsByJobTypeIds(List<String> treeIds);
}